<?php

namespace app\common\model;

use think\Model;

class Actionlog extends Model
{
    protected $table='actionlog';

    /**
     * 关联获取数据
     * @param $where
     * @return mixed
     */
    public function getAllData($where,$get){
        $data =db($this->table)
            ->alias('al')
            ->join('admin a','a.admin_id=al.admin_id')
            ->field('a.username,al.*')
            ->where($where)
            ->order('al.action_time desc')
            ->paginate(15,false,['query'=>$get]);
        return $data;
    }
}
